package cn.tedu.eb_film.controller;

import cn.tedu.eb_film.mapper.InformationMapper;
import cn.tedu.eb_film.pojo.vo.EmployeeListItemVO;
import cn.tedu.eb_film.pojo.vo.InformationListItemVO;
import cn.tedu.eb_film.service.InformationService;
import cn.tedu.eb_film.utils.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "资讯管理模块")
@Slf4j
@RestController
@RequestMapping("/informations")
@Validated
public class InformationController {

    @Autowired
    private InformationService informationService;


    @GetMapping("/list")
    @ApiOperation("查询资讯列表")
    @ApiOperationSupport(order = 410)
    public JsonResult<List<InformationListItemVO>> list(){

        List<InformationListItemVO> list=
                informationService.selectList();
        return JsonResult.ok(list);
    }
}
